package cn.yxr.service.Impl;

import cn.yxr.mapper.AppInfoMapper;
import cn.yxr.mapper.app2mapper;
import cn.yxr.pojo.AppInfo;
import cn.yxr.pojo.AppVersion;
import cn.yxr.service.AppinfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


import java.util.List;
@Service
public class AppinfoServiceImpl implements AppinfoService {
    @Autowired
    private app2mapper mapper;
    @Autowired
    private AppInfoMapper appInfoMapper;
    public int addinfo(AppInfo appInfo) {
        return mapper.addinfo(appInfo);
    }

    public int deleinfo(int id) {
        return 0;
    }

    public int updateinfo(AppInfo appInfo) {
        return 0;
    }

    public AppInfo queryinfo(int id) {
        return null;
    }

    public List<AppInfo> getAppInfoList() {
        return mapper.getAppInfoList();
    }
    //模糊查询
    public List<AppInfo> search_AppInfoList(AppInfo appInfo) {
        List<AppInfo> list = appInfoMapper.search_AppInfoList(appInfo);
        return list;
    }
    //添加
    public int insert_AppInfo(AppInfo appInfo) {
        int i = appInfoMapper.insert_AppInfo(appInfo);
        return i;
    }
//删除
    public int delete_Byid(AppInfo appInfo) {
        int i=appInfoMapper.delete_Byid(appInfo);
        return i;
    }
    //根据添加版本id修改App信息
    public int update_ByVeid(AppVersion appVersion) {
        int i = appInfoMapper.update_ByVeid(appVersion);
        return i;
    }
    //修改
    public int modify_AppInfoByid(AppInfo appInfo) {
        int i = appInfoMapper.modify_AppInfoByid(appInfo);
        return i;
    }

    public int update_StatusByid(AppInfo appInfo) {

        return 0;
    }
}
